package com.hd.service.sqlexcel.impl;

import java.util.List;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hd.dao.BaseDao;
import com.hd.entity.sqlexcel.SqlExcelField;
import com.hd.service.sqlexcel.SqlExcelFieldService;
/**
* 
*/
@Service("sqlExcelFieldService")
public class SqlExcelFieldServiceImpl implements SqlExcelFieldService {
    @Autowired
    private BaseDao<SqlExcelField,String>sqlExcelFieldDao;
    @Override
    public void save(SqlExcelField sqlExcelField) {
       sqlExcelField.setId(UUID.randomUUID().toString());
       sqlExcelFieldDao.save(sqlExcelField);
    }
   
    @Override
    public void delete(String id){
      sqlExcelFieldDao.delete(SqlExcelField.class,id);
    }
       

    @Override
    public void update(SqlExcelField sqlExcelField) {
        sqlExcelFieldDao.update(sqlExcelField);
    }
    @Override
    public SqlExcelField get(String id){
    	return sqlExcelFieldDao.get(SqlExcelField.class, id);
    }

	@Override
	public List<SqlExcelField> findAllByFId(String fid) {
		String hql="from SqlExcelField where fid=? order by seq asc";
		return sqlExcelFieldDao.find(hql, fid);
	}
        
	
   



}
